package com.lq.ecoldchain.entity

import android.os.Parcel
import android.os.Parcelable

/*
*2019/1/7 0007  16:57
*function by lq
*/
data class BankCardEntity(
        val bankName:String,
        val bankNo:String,
        val createTime:Long,
        val id :Int,
        val name:String
) : Parcelable {
    constructor(parcel: Parcel) : this(
            parcel.readString(),
            parcel.readString(),
            parcel.readLong(),
            parcel.readInt(),
            parcel.readString()) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(bankName)
        parcel.writeString(bankNo)
        parcel.writeLong(createTime)
        parcel.writeInt(id)
        parcel.writeString(name)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<BankCardEntity> {
        override fun createFromParcel(parcel: Parcel): BankCardEntity {
            return BankCardEntity(parcel)
        }

        override fun newArray(size: Int): Array<BankCardEntity?> {
            return arrayOfNulls(size)
        }
    }
}